﻿namespace OMS.Ice.T4Generator.Syntax
{
    internal class TextBlock : Part
    {
        private readonly string _content;
        private readonly int _position;

        public TextBlock( int position, string content )
        {
            _position = position;
            _content = content;
        }

        public override int Index
        {
            // Index and position is the same for text blocks.
            get { return _position; }
        }

        public override int Position
        {
            get { return _position; }
        }
        public string Content
        {
            get { return _content; }
        }

        public override int Length
        {
            get { return _content.Length; }
        }
    }
}